package com.dlx.enums;

/**
 * <h3>smms_parent</h3>
 *
 * @author nglon
 * @description <p>会员等级枚举类</p>
 * @date 2021-11-09 17:25
 **/
public enum MemLevelEnum {
    BRONZE(1L,"青铜会员"),
    SILVER(2L,"白银会员"),
    GOLD(3L,"黄金会员"),
    DIAMOND(4L,"钻石会员")
    ;

    private Long levelId;
    private String levelName;

    MemLevelEnum(Long levelId, String levelName) {
        this.levelId = levelId;
        this.levelName = levelName;
    }

    public static String getLevelNameByLevelId(Long levelId) {
        MemLevelEnum arrObj[] = MemLevelEnum.values();
        for (MemLevelEnum obj : arrObj) {
            if (levelId.intValue() == obj.getLevelId().intValue()) {
                return obj.getLevelName();
            }
        }
        return "";
    }

    public Long getLevelId() {
        return levelId;
    }

    public void setLevelId(Long levelId) {
        this.levelId = levelId;
    }

    public String getLevelName() {
        return levelName;
    }

    public void setLevelName(String levelName) {
        this.levelName = levelName;
    }
}
